﻿@model StoreManager.Models.ImportOrder

@{
    ViewBag.Title = "Details";
    var importDetail = new StoreManager.Models.ImportOrderDetail();
}

<h2>Details</h2>

<fieldset>
    <legend>ImportOrder</legend>
      <div class="display-label">
         @Html.DisplayNameFor(model => model.ImportOrderNo)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.ImportOrderNo)
    </div>
    <div class="display-label">
         @Html.DisplayNameFor(model => model.ImportDate)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.ImportDate)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.StaffID)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.StaffID)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.Type)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Type)
    </div>
      <div class="display-label">
         @Html.DisplayNameFor(model => model.SupplierID)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.SupplierID)
    </div>
 @if(Model.ImportOrderDetails != null && Model.ImportOrderDetails.Count > 0) {
<table>
     <tr>
        <td>@Html.DisplayNameFor(i => importDetail.Type)</td>
        <td>@Html.DisplayNameFor(i => importDetail.ProductID)</td>
        <td>@Html.DisplayNameFor(i => importDetail.Quantity)</td>
        <td>@Html.DisplayNameFor(i => importDetail.Price)</td>
    </tr>
   @foreach(var item in Model.ImportOrderDetails) {
    <tr>
        <td>@Html.DisplayFor(i => item.Type)</td>
        <td>@Html.DisplayFor(i => item.ProductID)</td>
        <td>@Html.DisplayFor(i => item.Quantity)</td>
        <td>@Html.DisplayFor(i => item.Price)</td>
    </tr>
   }
</table>   
 }
</fieldset>
<p>
    @Html.ActionLink("Edit", "Edit", new { id=Model.ImportOrderID }) |
    @Html.ActionLink("Back to List", "Index")
</p>
